/**************************************************************************
 *
 *        Copyright (c) 2007-2008 by Sunplus mMedia Inc., Ltd.
 *
 *  This software is copyrighted by and is the property of Sunplus
 *  mMedia Inc., Ltd. All rights are reserved by Sunplus mMedia
 *  Inc., Ltd. This software may only be used in accordance with the
 *  corresponding license agreement. Any unauthorized use, duplication,
 *  distribution, or disclosure of this software is expressly forbidden.
 *
 *  This Copyright notice MUST not be removed or modified without prior
 *  written consent of Sunplus mMedia Inc., Ltd.
 *
 *  Sunplus mMedia Inc., Ltd. reserves the right to modify this
 *  software without notice.
 *
 *  Sunplus mMedia Inc., Ltd.
 *  19-1, Innovation First Road, Science-Based Industrial Park,
 *  Hsin-Chu, Taiwan, R.O.C.
 *
 **************************************************************************/
/**
 * @file		sp1k_exif_api.h
 * @brief		sp1k exif module header file.
 * @author		Xian Xin
 * @since		2008-10-27
 * @date		2008-10-27
 */
#ifndef __SP1K_EXIF_API_H__
#define __SP1K_EXIF_API_H__

#include "exifhdr.h"

/**************************************************************************
 *                              C O N S T A N T S
 **************************************************************************/

/**************************************************************************
 *                                  M A C R O S
 **************************************************************************/
#ifdef SP1K_DOXY_GEN

/**
 * @fn UINT8 sp1kEXIFTagValueSet(UINT8 ifdType, UINT16 tagId, UINT16 idfDataType, UINT32 ifdCnt, UINT32 valueOffset, UINT8 *pvalue, UINT8 bigEndian)
 * @brief	Set exif tag values. 
 * @param[in] ifdType   specified as IFD0, EXIF IFD, IFD1 or Interoperability IFD 
 * @param[in] tagId     specify IFD's tag id  
 * @param[in] idfDataType   specify IFD's data type as IFD_DATATYPE_BYTE ~ IFD_DATATYPE_SRATIONAL
 * @param[in] ifdCnt        specify IFD's value count 
 * @param[in] valueOffset   specify IFD's new value, it is useless as offset.
 * @param[in] pvalue    specify IFD's value
 * @param[in] bigEndian specify the byteorder of ifdCnt, valueOffset and pvalue. 1:big endian, 0:little endian
 * @retval error_code   success: 0, fail: 1
 * @see enum "idfTypeID_e"
 */
UINT8 sp1kEXIFTagValueSet(UINT8 ifdType, UINT16 tagId, UINT16 idfDataType, UINT32 ifdCnt, UINT32 valueOffset, UINT8 *pvalue, UINT8 bigEndian);

/**
 * @fn void sp1kEXIFJPGCommentSet(UINT8 *txt, UINT8 len)
 * @brief	Set jpg comment text. 
 * @param[in] txt   specify comment text 
 * @param[in] len   text length, should not exceed Length_Text_ThumbOdd_Comment 
 * @retval None
 * @see 
 */
void sp1kEXIFJPGCommentSet(UINT8 *txt, UINT8 len);

#else
#define sp1kEXIFTagValueSet             EXIFTagValueSet
#define sp1kEXIFJPGCommentSet			EXIFJPGCommentSet
#endif

#endif  /* __SP1K_EXIF_API_H__ */
